window.addEvent('domready', function(){
  var miElemento = $('MShome').getParent();
  miElemento.set('id','current');

 /*  $('MSSearch').addEvent('click', function(e) {
   var request = new Request({
	url: 'views/SearchContenido.php',
	method: 'get',
	update: 'refresh-me',
	onComplete: function(response) {
		$('contenido').set('html',response);
	    $$('.MS').each(function(element) { element.set('id','#');});
	    var miElemento = $('MSSearch').getParent();
	    miElemento.set('id','current');
	}
})
 request.send();
  })  */
   $('MShome').addEvent('click', function(e) {
   var request = new Request({
	url: 'views/HomeContenido.php',
	method: 'get',
	update: 'refresh-me',
	onComplete: function(response) {
		$('contenido').set('html',response);
	    $$('.MS').each(function(element) { element.set('id','#');});
	    var miElemento = $('MShome').getParent();
	    miElemento.set('id','current');
	    $$('.MI').each(function(element) { element.set('id','#');});
	    var miElemento = $('home').getFirst();
		miElemento.set('id','current');
  	
	}
})
 request.send();
  })
    $('MSToolsService').addEvent('click', function(e) {
   var request = new Request({
	url: 'views/ToolsServiceTabsContenido.php',
	method: 'get',
	update: 'refresh-me',
	onComplete: function(response) {
		$('contenido').set('html',response);
	    $$('.MS').each(function(element) { element.set('id','#');});
	    var miElemento = $('MSToolsService').getParent();
	    miElemento.set('id','current');
	     $$('.MI').each(function(element) { element.set('id','#');});
	    	miElemento = $('ToolsService').getFirst();
	 			miElemento.set('id','current');
  		  new Asset.javascript('scriptaplicacion/tabsToolsService.js', {id: 'idtp1'});
  	
	}
})
 request.send();
  })
  
   $('MSpublications').addEvent('click', function(e) {
   var request = new Request({
	url: 'views/PublicacionesTabsContenido.php',
	method: 'get',
	update: 'refresh-me',
	onComplete: function(response) {
		$('contenido').set('html',response);
		//new Event(e).stop();
		new Asset.javascript('scriptaplicacion/tabsPublicaciones.js', {id: '5'});
		 $$('.MS').each(function(element) { element.set('id','#');});
	    var miElemento = $('MSpublications').getParent();
	    miElemento.set('id','current');
	    $$('.MI').each(function(element) { element.set('id','#');});
	    miElemento = $('publications').getFirst();
	 	miElemento.set('id','current');
  	
  	
	}
})
 request.send();
  })
  
   $('MSstaff').addEvent('click', function(e) {
   var request = new Request({
	url: 'views/StaffContenido.php',
	method: 'get',
	update: 'refresh-me',
	onComplete: function(response) {
		$('contenido').set('html',response);
		//new Event(e).stop();
		new Asset.javascript('scriptaplicacion/tooltipv3.js', {id: 'js1'});
		new Asset.javascript('scriptaplicacion/staffcontenido.js', {id: '2'});
		 $$('.MS').each(function(element) { element.set('id','#');});
	    var miElemento = $('MSstaff').getParent();
	      miElemento.set('id','current');
	     $$('.MI').each(function(element) { element.set('id','#');});
	    miElemento = $('staff').getFirst();
	    miElemento.set('id','current');
	}
})
 request.send();
  })
  
$('MSprojects').addEvent('click', function(e) {
   var request = new Request({
	url: 'views/ProyectosTabsContenido.php',
	method: 'get',
	update: 'refresh-me',
	onComplete: function(response) {
		$('contenido').set('html',response);
		 //new Event(e).stop();
		 new Asset.javascript('scriptaplicacion/tabsProyectos.js', {id: 'unId3'});
		 $$('.MS').each(function(element) { element.set('id','#');});
	      var miElemento = $('MSprojects').getParent();
	      miElemento.set('id','current');
		  $$('.MI').each(function(element) { element.set('id','#');});
	      miElemento = $('projects').getFirst();
	 	  miElemento.set('id','current');
		 	
	}
  })
 request.send();
  })  
  
});	
/*
window.addEvent('domready', function(){
   $('events').addEvent('click', function(e) {
   var request = new Request({
	url: 'views/EventosTabsContenido.php',
	method: 'get',
	update: 'refresh-me',
	onComplete: function(response) {
		$('contenido').set('html',response);
		//$$('.menuS').each(function(element) { element.setStyle('display','none');});
 		   new Event(e).stop();
		   new Asset.javascript('scriptaplicacion/tabsEventos.js', {id: 'unId3'});
		   $$('.MI').each(function(element) { element.set('id','#');});
	       var miElemento = $('events').getFirst();
	 	   miElemento.set('id','current');
 	
	}
})
 request.send();
  })
});	

window.addEvent('domready', function(){
   $('projects').addEvent('click', function(e) {
   var request = new Request({
	url: 'views/ProyectosTabsContenido.php',
	method: 'get',
	update: 'refresh-me',
	onComplete: function(response) {
		$('contenido').set('html',response);
		 new Event(e).stop();
		 new Asset.javascript('scriptaplicacion/tabsProyectos.js', {id: 'unId3'});
		$$('.MI').each(function(element) { element.set('id','#');});
	    var miElemento = $('projects').getFirst();
		miElemento.set('id','current');
		 	
	}
  })
 request.send();
  })
});	

window.addEvent('domready', function(){
   $('staff').addEvent('click', function(e) {
    var request = new Request({
	url: 'views/StaffContenido.php',
	method: 'get',
	update: 'refresh-me',
	onComplete: function(response) {
		$('contenido').set('html',response);
		 //$$('.menuS').each(function(element) { element.setStyle('display','none');});
		   new Event(e).stop();
		   	   new Asset.javascript('scriptaplicacion/tooltipv3.js', {id: 'js1'});
		   	   new Asset.javascript('scriptaplicacion/staffcontenido.js', {id: '2'});
		   	    $$('.MI').each(function(element) { element.set('id','#');});
	    		var miElemento = $('staff').getFirst();
				miElemento.set('id','current');
	}
})

 request.send();
  
  
  })
  
});	

window.addEvent('domready', function(){
  $('home').addEvent('click', function(e) {
    var request = new Request({
	url: 'views/HomeContenido.php',
	method: 'get',
	update: 'refresh-me',
	onComplete: function(response) {
		$('contenido').set('html',response);
	    //$$('.menuS').each(function(element) { element.setStyle('display','none');});
	    $$('.MI').each(function(element) { element.set('id','#');});
	    var miElemento = $('home').getFirst();
		miElemento.set('id','current');
	}
})
	 request.send();
  })
	
});
window.addEvent('domready', function(){
  $('publications').addEvent('click', function(e) {
    var request = new Request({
	url: 'views/PublicacionesTabsContenido.php',
	method: 'get',
	update: 'refresh-me',
	onComplete: function(response) {
		//alert("hola!");
		$('contenido').set('html',response);
	    //$$('.menuS').each(function(element) { element.setStyle('display','none');});
		new Event(e).stop();
		new Asset.javascript('scriptaplicacion/tabsPublicaciones.js', {id: '5'});
		$$('.MI').each(function(element) { element.set('id','#');});
	       var miElemento = $('publications').getFirst();
	 	   miElemento.set('id','current');
  	
			
 	
	}
})
	 request.send();
  })
	
});


 var request = new Request({
	url: 'views/HomeContenido.php',
	method: 'get',
	update: 'refresh-me',
	onComplete: function(response) {
		$('contenido').set('html',response);
	    //$$('.menuS').each(function(element) { element.setStyle('display','none');});
	    $$('.MI').each(function(element) { element.set('id','#');});
	       var miElemento = $('home').getFirst();
	 	   miElemento.set('id','current');

	}
})
	 request.send();*/